﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iLangl.Model;

namespace iLangl.Customer.Actions
{
	public class GetCustomerSettings : BaseCustomerAction
	{
		public SettingsForCustomer Settings = null;

		public GetCustomerSettings()
		{
			SettingsForCustomerResponseContext response = new SettingsForCustomerResponseContext();
			response.ContextUpdated += new EventHandler(response_ContextUpdated);
			ResponseContext = response;
		}

		void response_ContextUpdated(object sender, EventArgs e)
		{
			object result = ResponseContext.GetContext();

			if (result is SettingsForCustomer)
			{
				Settings = (SettingsForCustomer)result;
			}

			weGetResult();
		}
		
		protected override string GetName()
		{
			return "GetCustomerSettings";
		}

		protected override string GetVersion()
		{
			return "1";
		}
	}
}
